package com.mapper;

import com.domain.TAddress;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author Lsj
 * @version 1.0
 * @date 2021/6/22 19:25
 */

@Mapper
public interface TAddressMapper<deleteById> {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(TAddress record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(TAddress record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    TAddress selectByPrimaryKey(Integer id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(TAddress record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(TAddress record);

    int updateBatch(List<TAddress> list);

    /**
     * @param list
     * @return
     */
    int batchInsert(@Param("list") List<TAddress> list);

    /**
     * 批量删除
     *
     * @param list
     * @return
     */
    int deleteByIdBatch(@Param("list") List<TAddress> list);


}